<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// think\Route::rule('demo','index/index/demo');
// think\Route::rule('testa','index/index/testa');
// think\Route::rule('test1','index/index/test1');
// think\Route::rule('php','index/index/test1');

// 动态路由
// think\Route::rule('demo/:name/:lesson','index/index/demo','GET',['ext'=>'shtml'],['name'=>'\w{3,8}','lesson'=>'\w{1,10}']);
// 可选参数
think\Route::rule('demo/:name/[:lesson]','index/index/demo','GET',['ext'=>'shtml'],['name'=>'\w{3,8}','lesson'=>'\w{1,10}']);
// return [
// 	'demo/:lesson'=>['index/index/demo',['method'=>'get','ext'=>'shtml'],['lesson'=>'\w{1,10}']],
// 	'testa'=>'index/index/testa',
// ];


// return [
//     '__pattern__' => [
//         'name' => '\w+',
//     ],
//     '[hello]'     => [
//         ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//         ':name' => ['index/hello', ['method' => 'post']],
//     ],

// ];
